
package gameam.business;

import java.io.*;
import java.util.logging.FileHandler;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.logging.SimpleFormatter;


public class MCLogger
{
	static private boolean isSetup = false;
	static private FileHandler fileTxt;
	static private SimpleFormatter formatterTxt;
	
	static public void Setup() throws IOException
	{
		if (isSetup == true)
			return;
		
		Logger logger = Logger.getLogger("");
		logger.setLevel(Level.INFO);
		fileTxt = new FileHandler("Log.txt");
		
		formatterTxt = new SimpleFormatter();
		fileTxt.setFormatter(formatterTxt);
		logger.addHandler(fileTxt);
		
		isSetup = true;
	}
}
